﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="StorageAdd.aspx.cs" Inherits="Comod_StorageAdd" %>

<html>
<head>
<title>商品入库</title>
<link href="../css/adminCss.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../js/rl.js"></script>
<script type="text/javascript" src="../js/submit.js"></script>
<script type="text/javascript" src="../js/Check.js"></script>
<link href="../js/loading.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
var xmlHttp; 
var ajaxresponsevalue;
function createXMLHttpRequest() { 
    if (window.ActiveXObject) { 
        xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); 
    } 
    else if (window.XMLHttpRequest) { 
        xmlHttp = new XMLHttpRequest(); 
    } 
} 
 function startRequest() {  
     /* if(document.getElementById('ComodBarcode').value!="")
     {
    document.getElementById('Msg').innerHTML = "正在获取客户信息...";
    document.getElementById("Msg").style.visibility="visible";
    createXMLHttpRequest(); 
    xmlHttp.onreadystatechange = handleStateChange; 
    xmlHttp.open("POST", 'Data.aspx?ComodBarcode='+escape(document.getElementById('ComodBarcode').value), true);
    xmlHttp.send(null); 
    }
}
function handleStateChange() { 
    if(xmlHttp.readyState == 4) { 
        if(xmlHttp.status == 200) {
            getDownListData(xmlHttp.responseText,0);	
      } 
    } */
} 
    
//查询客户资料信息
function getDownListData(ComodBarcode,flag)
{
var pos,str,para,parastr,tempstr1; 
tempstr=""; 
str = window.location.href; 
pos = str.indexOf("?") 
parastr = str.substring(pos+1);  
if(ComodBarcode!="" || flag==1)
{
    //var result =openwin(800,550,"selectCatalogue.aspx??ComodBarcode="+escape(ComodBarcode)+"&"+parastr);
     var result =window.showModalDialog("selectCatalogue.aspx?ComodBarcode="+escape(ComodBarcode)+"&"+parastr,"","dialogWidth:800px;dialogHeight:600px;scroll:yes;help:0;status:no;");
     if(result!=undefined)
     {
     var objType=document.getElementById("ddlType");
     for(var i=0; i<objType.options.length;i++){
        if(objType.options[i].text==result.split('||')[0]){
            objType.options[i].selected = true;
            break;
        }
     }
     document.getElementById("catalogueName").innerText=result.split('||')[1];
     document.getElementById("ComodBarcode").innerText=result.split('||')[2];
     document.getElementById("Spec").innerText=result.split('||')[3];
     document.getElementById("Units").innerText=result.split('||')[4]; 
     document.getElementById("Prices").innerText=result.split('||')[5];
     document.getElementById("ProcMoney").innerText=result.split('||')[6];
      }
}
document.getElementById("Msg").style.visibility="hidden";
}

</script>
</head>
<script type="text/javascript" src="../js/loading.js" charset="gb2312"></script>
<body >
    <form id="form1" runat="server" >
        <table width="99%" border="0" align="center" cellpadding="0" cellspacing="0"  >
            <tr>
                <td width="2%" height="22" >
                    <img src="../images/module.gif"  height="22"/></td>
                <td width="85%" >
              <asp:Label ID="lblPatd" runat="server"></asp:Label></td>
                <td width="13%" align="right" >
                    <font color="red"> [ <a href="javascript:location.href=document.referrer;" ><font color="red">返回</font></a> ]</font>                </td>
            </tr>
      </table>
        <table width="99%" border="0" align="center" cellpadding="0" cellspacing="0" >
            <tr>
                <td bgcolor="#3CB6E5" height="5px">
                </td>
            </tr>
      </table>
        <table width="99%" border="0" align="center" cellpadding="1" cellspacing="1" class="tabGg" >
            <tr>
                <td colspan="4" align="center" bgcolor="#ffffff"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td align="center" class="F_B font14">备件入库</td>
                  </tr>
                </table>                </td>
            </tr>
            
            <tr>
                <td width="12%" bgcolor="#FFFFFF" class="r_bg" ><span class="r_bg">所属类型</span>：</td>
              <td width="38%" bgcolor="#FFFFFF" class="right_bg"  >
                  <asp:DropDownList ID="ddlType" runat="server"  ></asp:DropDownList>
                  <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="ddlType"     ErrorMessage="请选择"></asp:RequiredFieldValidator></td>
                    <td width="12%" bgcolor="#FFFFFF" class="r_bg" >采购数量：</td>
                <td width="38%" bgcolor="#FFFFFF" class="right_bg"  >
              <input id="ProcNum" runat="server" type="text" check_number='数量输入错误'  onBlur="if(this.value=='')this.value=0"   onFocus="if(this.value==0)this.value=''"  class="input1" value="1"  /></td>
            </tr>
            <tr>
                <td bgcolor="#FFFFFF" class="r_bg">编号(条码)：</td>
              <td bgcolor="#FFFFFF" class="right_bg F_red"><asp:TextBox ID="ComodBarcode" runat="server" CssClass="input1" onkeyup="startRequest()" ondblclick="getDownListData(this.value,1)" check_null="客户名称不能为空"></asp:TextBox><div id="Msg" style="position: absolute; width: 120px; height: 20px; z-index: 1;border: 1px solid #ff0000; background-color: #FEEED3; layer-background-color: #FEEED3;filter: alpha(opacity=50); visibility: hidden;"></div>*双击选择</td>
                <td bgcolor="#FFFFFF" class="r_bg">入库仓库：</td>
                <td bgcolor="#FFFFFF" class="right_bg"><asp:DropDownList ID="ddlWarehouse" runat="server"  CssClass="input1" Width="130px"> </asp:DropDownList></td>
            </tr>
            <tr>
                <td bgcolor="#FFFFFF" class="r_bg">目录名称：</td>
                <td bgcolor="#FFFFFF" class="right_bg"><asp:TextBox ID="catalogueName" runat="server" CssClass="input1"></asp:TextBox></td>
                <td bgcolor="#FFFFFF" class="r_bg">规格型号：</td>
                <td bgcolor="#FFFFFF" class="right_bg"><asp:TextBox ID="Spec" runat="server" CssClass="input1"></asp:TextBox></td>
            </tr>
            <tr>
                <td bgcolor="#FFFFFF" class="r_bg" >商品单位：</td>
                <td bgcolor="#FFFFFF" class="right_bg"  >
                    <asp:TextBox ID="Units" runat="server" CssClass="input1" onblur="if(this.value=='')this.value=0"
                        onfocus="if(this.value==0)this.value=''">0</asp:TextBox>
                    </td>
                <td bgcolor="#FFFFFF" class="r_bg"  >入库日期：</td>
                <td bgcolor="#FFFFFF" class="right_bg"  >
                    <asp:TextBox ID="storageTime" runat="server" CssClass="input1" onclick="SelectDate(this.id)"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ErrorMessage="选输入" ControlToValidate="storageTime"></asp:RequiredFieldValidator></td>
            </tr>
            <tr>
                <td bgcolor="#FFFFFF" class="r_bg">销售价：</td>
                <td bgcolor="#FFFFFF" class="right_bg"><asp:TextBox ID="Prices" runat="server" onBlur="if(this.value=='')this.value=0"   onFocus="if(this.value==0)this.value=''" CssClass="input1" onkeyup="value=value.replace(/[^\d.]/g,'');">0</asp:TextBox>元</td>
                <td bgcolor="#FFFFFF" class="r_bg">进货价：</td>
                <td bgcolor="#FFFFFF" class="right_bg">
                    <asp:TextBox ID="ProcMoney" runat="server" CssClass="input1" onblur="if(this.value=='')this.value=0" onfocus="if(this.value==0)this.value=''" onkeyup="value=value.replace(/[^\d.]/g,'');">0</asp:TextBox>元</td>
            </tr>
            <tr>
                <td bgcolor="#FFFFFF" class="r_bg">维修价：</td>
                <td bgcolor="#FFFFFF" class="right_bg">
                    <asp:TextBox ID="serviceMoney" runat="server" CssClass="input1" onblur="if(this.value=='')this.value=0"  onfocus="if(this.value==0)this.value=''" onkeyup="value=value.replace(/[^\d.]/g,'');">0</asp:TextBox>元</td>
                <td bgcolor="#FFFFFF" class="r_bg">
                    供应价：</td>
                <td bgcolor="#FFFFFF" class="right_bg">
                    <asp:TextBox ID="SuppliMoney" runat="server" CssClass="input1" onblur="if(this.value=='')this.value=0"  onfocus="if(this.value==0)this.value=''" onkeyup="value=value.replace(/[^\d.]/g,'');">0</asp:TextBox>元</td>
            </tr>
            <tr>
                <td bgcolor="#FFFFFF" class="r_bg" >商品备注：</td>
                <td colspan="3" bgcolor="#FFFFFF" class="right_bg" >
                    <asp:TextBox ID="Remark" runat="server"  Columns="40" Rows="4" TextMode="MultiLine"></asp:TextBox></td>
            </tr>
            <tr id="flag">
                <td bgcolor="#FFFFFF" class="r_bg" >审核：</td>
                <td colspan="3" bgcolor="#FFFFFF" class="right_bg" ><input name="AuditState" id="AuditState" runat="server" type="radio" value="1" checked />通过  <input name="AuditState" id="AuditState1" runat="server" type="radio" value="0"/>不通过</td>
            </tr>
            <tr>
                <td bgcolor="#FFFFFF" class="r_bg" >操作人员：</td>
                <td bgcolor="#FFFFFF" class="right_bg" >
                    <asp:Label ID="lblUser" runat="server"></asp:Label></td>
                <td bgcolor="#FFFFFF" class="r_bg" >操作时间：</td>
                <td bgcolor="#FFFFFF" class="right_bg"><asp:Label CssClass="right_bg" ID="lblTime" runat="server"></asp:Label></td>
            </tr>
            <tr>
                <td bgcolor="#FFFFFF" class="r_bg" >                </td>
                <td colspan="3" bgcolor="#FFFFFF" class="right_bg" >
                    <asp:HiddenField ID="hidModuid" runat="server"/>
                    <asp:Button ID="btnAdd" CssClass="submit" runat="server" Text=" 提交 "  OnClick="btnAdd_Click" />                </td>
            </tr>
      </table>
    </form>
</body>
</html>
